package com.shop.item.atom;

import com.shop.common.model.param.item.ItemBaseInput;
import com.shop.common.model.param.item.ItemDetailsInput;
import com.shop.common.model.result.item.ItemBaseOutput;
import com.shop.common.model.result.item.ItemDetailsOutput;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@RequestMapping("/item/atom")
public interface ItemAtomApi {
    @GetMapping(value = "/itemBase/{itemId}", produces = MediaType.APPLICATION_JSON_VALUE)
    ItemBaseOutput qryItemBase(@PathVariable(value = "itemId") Integer itemId);

    @GetMapping(value = "/itemBase", produces = MediaType.APPLICATION_JSON_VALUE)
    List<ItemBaseOutput> qryItemBaseList(@RequestBody ItemBaseInput itemBaseInput);

    @GetMapping(value = "/itemDetails/{itemId}", produces = MediaType.APPLICATION_JSON_VALUE)
    ItemDetailsOutput qryItemDetails(@PathVariable(value = "itemId") Integer itemId);

    @GetMapping(value = "/itemDetails", produces = MediaType.APPLICATION_JSON_VALUE)
    List<ItemDetailsOutput> qryItemDetailsList(@RequestBody ItemDetailsInput itemDetailsInput);

    @GetMapping(value = "/flushSolr", produces = MediaType.APPLICATION_JSON_VALUE)
    String flushSolr();
}
